<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function clearForm(form)
{
  $(form).children('input, select, textarea').val('');
  $(form).children('input[type=radio], input[type=checkbox]').each(function()
  {
     this.checked = false;
     // or
     $(this).attr('checked', false);
  });
}
</script>
</head>
<body>
<form id="myform">
  <input type="text" value="text" /><br />
  <input type="password" value="pass" /><br />
  <select>
    <option value="0">Select</option>
    <option value="1">Value</option>
  </select><br />
  <input type="radio" name="sex" value="male" /> Male<br />
  <input type="checkbox" name="vehicle" value="Car" /> I have a car<br />
  <textarea>textarea</textarea>
</form>
<button onclick="clearForm('#myform');">Clear form</button>
</body>
</html>
